package com.lingnan.feign;

import com.lingnan.entity.vo.Result;
import com.lingnan.entity.po.Interview;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "interview-service", path = "/interview")
public interface InterviewFeignClient {

    @PostMapping("/create")
    Result<Interview> createInterview(@RequestBody Interview interview);

    @GetMapping("/getInterviewsByApplicationId/{applicationId}")
    Result<List<Interview>> getInterviewsByApplicationId(@PathVariable("applicationId") Long applicationId);

    @DeleteMapping("/deleteInterviewsByApplicationId/{applicationId}")
    Result<Boolean> deleteInterviewsByApplicationId(@PathVariable("applicationId") Long applicationId);
}
